<template>
    <!-- 组件的结构 -->
    <div class="category">
        <h3>{{title}}分类</h3>
        <slot :games="games"></slot>
    </div>  
</template>

<script>
    export default{
            name:'Category-test',
            data(){
                return{
                    games:['红色警戒','穿越火线','英雄联盟','qq飞车']
                }
            },
            props:['title']
            }
</script>

<style>
   .category{
        width: 200px;
        height: 300px;
        background-color: pink;
   }
   h3{
        text-align: center;
        background-color: yellow;
   }
</style>